package com.agileboot.attendance.domain.order.db;

import com.agileboot.attendance.domain.order.entity.AttOrderEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * 订单表 Mapper 接口
 * </p>
 *
 * @author agileboot
 */
@Mapper
public interface AttOrderMapper extends BaseMapper<AttOrderEntity> {

    /**
     * 根据订单ID查询订单编号
     *
     * @param orderId 订单ID
     * @return 订单编号
     */
    @Select("SELECT order_code FROM att_order WHERE order_id = #{orderId}")
    String selectOrderCodeById(@Param("orderId") Long orderId);
} 